Background: Despite the increasing number of bug analysis tools for exploring bugs\nin software systems, there are no tools supporting the investigation of causality\nrelationships between internal quality metrics and bugs. In this paper, we propose an\nextension of the BugMaps tool called BugMaps-Granger that allows the analysis of\nsource code properties that are more likely to cause bugs. For this purpose, we relied\non the Granger Causality Test to evaluate whether past changes to a given time series\nof source code metrics can be used to forecast changes in a time series of defects. Our\ntool extracts source code versions from version control platforms, calculates source\ncode metrics and defects time series, computes Granger Test results, and provides\ninteractive visualizations for causal analysis of bugs.\nResults: We provide an example of use of BugMaps-Granger involving data from the\nEquinox Framework and Eclipse JDT Core systems collected during three years. For\nthese systems, the tool was able to identify the modules with more bugs, the average\nlifetime and complexity of the bugs, and the source code properties that are more\nlikely to cause bugs.\nConclusions: With the results provided by the tool in hand, a maintainer can perform\nat least two main software quality assurance activities: (a) refactoring the source code\nproperties that Granger-caused bugs and (b) improving unit tests coverage in classes\nwith more bugs.
Loading....